package org.jctc.els.modules.biz.mapper.elsTeamProject;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.jctc.els.modules.biz.entity.elsTeamProject.ElsTeamProject;
import org.jctc.els.modules.biz.vo.ElsTeamProjectVO;

import java.util.List;

/**
* @author maxinyu
* @description 针对表【els_team_project(小组项目关联表)】的数据库操作Mapper
* @createDate 2022-06-24 14:34:48
* @Entity generator.domain.ElsTeamProject
*/
@Mapper
public interface ElsTeamProjectMapper extends BaseMapper<ElsTeamProject> {
    int selectProjectAlreadyExists(@Param("projectId") Long projectId, @Param("teamId") Long teamId);

    List<ElsTeamProjectVO> getProjectsList(IPage<ElsTeamProjectVO> page, @Param("teamId") String teamId);

    void removeListByIds(Long id);

    /**
     * 删除小组项目
     * @param teamId
     * @param projectIds
     * @return
     */
    int removeTeamProjects(@Param("teamId") Long teamId,
                           @Param("projectIds") List<Long> projectIds);

}




